<?php
    $cars=array("B","G","M");
    //遍历  多个   每一个
    foreach($cars as $c){
        echo $c."</br>";
    }
    echo "<hr>";
    // echo $cars[2];
    echo "<table border='1'>";
    for($x=0;$x<count($cars);$x++){
        echo "<tr>";
            echo "<td>";
            echo $cars[$x];
            echo "</td>";
        echo "</tr>";
    }
    echo "</table>";
    echo "<hr>";
?>
<!-- 静态代码 -->
<table border='1'>
    <tr>
       <td>品牌</td>
    </tr>
    <!-- 动态代码 -->
    <?php foreach($cars as $c):?>
        <tr>
            <td><?php echo $c;?></td>
        </tr>
	<?php endforeach;?>
   
</table>